const rand = require('./rand');

function percent(num){
    //获取一个从 1- 100的随机数
    let x = rand(1, 100);
    //判断
    if(x <= num){
        return true;
    }else{
        return false;
    }
}

//暴露
module.exports = percent;